<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="orgpolicy_v2.html">Organization Policy API</a> . <a href="orgpolicy_v2.projects.html">projects</a> . <a href="orgpolicy_v2.projects.constraints.html">constraints</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
  <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">Lists constraints that could be applied on the specified resource.</p>
<p class="toc_element">
  <code><a href="#list_next">list_next()</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

<div class="method">
    <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
  <pre>Lists constraints that could be applied on the specified resource.

Args:
  parent: string, Required. The Google Cloud resource that parents the constraint. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}` (required)
  pageSize: integer, Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size.
  pageToken: string, Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # The response returned from the ListConstraints method.
  &quot;constraints&quot;: [ # The collection of constraints that are available on the targeted resource.
    { # A constraint describes a way to restrict resource&#x27;s configuration. For example, you could enforce a constraint that controls which Google Cloud services can be activated across an organization, or whether a Compute Engine instance can have serial port connections established. Constraints can be configured by the organization policy administrator to fit the needs of the organization by setting a policy that includes constraints at different locations in the organization&#x27;s resource hierarchy. Policies are inherited down the resource hierarchy from higher levels, but can also be overridden. For details about the inheritance rules, see `Policy`. Constraints have a default behavior determined by the `constraint_default` field, which is the enforcement behavior that is used in the absence of a policy being defined or inherited for the resource in question.
      &quot;booleanConstraint&quot;: { # A constraint type is enforced or not enforced, which is configured in the `PolicyRule`. If `customConstraintDefinition` is defined, this constraint is a managed constraint. # Defines this constraint as being a boolean constraint.
        &quot;customConstraintDefinition&quot;: { # Custom constraint definition. Defines this as a managed constraint. # Custom constraint definition. Defines this as a managed constraint.
          &quot;actionType&quot;: &quot;A String&quot;, # Allow or deny type.
          &quot;condition&quot;: &quot;A String&quot;, # Org policy condition/expression. For example: `resource.instanceName.matches(&quot;[production|test]_.*_(\d)+&quot;)` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.
          &quot;methodTypes&quot;: [ # All the operations being applied for this constraint.
            &quot;A String&quot;,
          ],
          &quot;parameters&quot;: { # Stores the structure of `Parameters` used by the constraint condition. The key of `map` represents the name of the parameter.
            &quot;a_key&quot;: { # Defines a parameter structure.
              &quot;defaultValue&quot;: &quot;&quot;, # Sets the value of the parameter in an assignment if no value is given.
              &quot;item&quot;: &quot;A String&quot;, # Determines the parameter&#x27;s value structure. For example, `LIST` can be specified by defining `type: LIST`, and `item: STRING`.
              &quot;metadata&quot;: { # Defines Metadata structure. # Defines subproperties primarily used by the UI to display user-friendly information.
                &quot;description&quot;: &quot;A String&quot;, # Detailed description of what this `parameter` is and use of it. Mutable.
              },
              &quot;type&quot;: &quot;A String&quot;, # Type of the parameter.
              &quot;validValuesExpr&quot;: &quot;A String&quot;, # Provides a CEL expression to specify the acceptable parameter values during assignment. For example, parameterName in (&quot;parameterValue1&quot;, &quot;parameterValue2&quot;)
            },
          },
          &quot;resourceTypes&quot;: [ # The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.
            &quot;A String&quot;,
          ],
        },
      },
      &quot;constraintDefault&quot;: &quot;A String&quot;, # The evaluation behavior of this constraint in the absence of a policy.
      &quot;description&quot;: &quot;A String&quot;, # Detailed description of what this constraint controls as well as how and where it is enforced. Mutable.
      &quot;displayName&quot;: &quot;A String&quot;, # The human readable name. Mutable.
      &quot;equivalentConstraint&quot;: &quot;A String&quot;, # Managed constraint and canned constraint sometimes can have equivalents. This field is used to store the equivalent constraint name.
      &quot;listConstraint&quot;: { # A constraint type that allows or disallows a list of string values, which are configured in the `PolicyRule`. # Defines this constraint as being a list constraint.
        &quot;supportsIn&quot;: True or False, # Indicates whether values grouped into categories can be used in `Policy.allowed_values` and `Policy.denied_values`. For example, `&quot;in:Python&quot;` would match any value in the &#x27;Python&#x27; group.
        &quot;supportsUnder&quot;: True or False, # Indicates whether subtrees of the Resource Manager resource hierarchy can be used in `Policy.allowed_values` and `Policy.denied_values`. For example, `&quot;under:folders/123&quot;` would match any resource under the &#x27;folders/123&#x27; folder.
      },
      &quot;name&quot;: &quot;A String&quot;, # Immutable. The resource name of the constraint. Must be in one of the following forms: * `projects/{project_number}/constraints/{constraint_name}` * `folders/{folder_id}/constraints/{constraint_name}` * `organizations/{organization_id}/constraints/{constraint_name}` For example, &quot;/projects/123/constraints/compute.disableSerialPortAccess&quot;.
      &quot;supportsDryRun&quot;: True or False, # Shows if dry run is supported for this constraint or not.
      &quot;supportsSimulation&quot;: True or False, # Shows if simulation is supported for this constraint or not.
    },
  ],
  &quot;nextPageToken&quot;: &quot;A String&quot;, # Page token used to retrieve the next page. This is currently not used.
}</pre>
</div>

<div class="method">
    <code class="details" id="list_next">list_next()</code>
  <pre>Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call &#x27;execute()&#x27; on to request the next
          page. Returns None if there are no more items in the collection.
        </pre>
</div>

</body></html>